Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g.gui.iclass: Add explanation of expected format for vector layers #4411

Merged
merged 1 commit into from
Sep 28, 2024

Conversation

dhdeangelis
Copy link
Contributor

g.gui.class allows for importing training areas from vector layers. However, it is not clear from the manual that some specific columns are desirable ('cat', 'class', 'color'). This PR addresses this issue by adding a clarification.

@echoix echoix changed the title add explanation of expected format for vector layers g.gui.iclass: Add explanation of expected format for vector layers Sep 28, 2024
@github-actions github-actions bot added GUI wxGUI related HTML Related code is in HTML docs labels Sep 28, 2024
echoix
echoix previously approved these changes Sep 28, 2024
@echoix
Copy link
Member

echoix commented Sep 28, 2024

@neteler The contents are correct, but how do we handle the particularities of the g.html2man.py that can't handle line breaks in <dt>...</dt> and g.gui.iclass.html:165:0: Error (IndexError('pop from empty list')): </p> in the Travis Build?

https://app.travis-ci.com/github/OSGeo/grass/jobs/626613157#L13795

make[4]: '/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/man/man1/g.gui.1' is up to date.
can't handle line breaks in <dt>...</dt>
VERSION_NUMBER=8.5.0dev /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/utils/g.html2man.py "/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/html/g.gui.iclass.html" "/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/man/man1/g.gui.iclass.1"
VERSION_NUMBER=8.5.0dev /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/utils/g.html2man.py "/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/html/g.gui.image2target.html" "/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/man/man1/g.gui.image2target.1"
/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/html/g.gui.iclass.html:165:0: Error (IndexError('pop from empty list')): </p>
make[4]: *** [../include/Make/Html.make:11: /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/man/man1/g.gui.iclass.1] Error 1
make[4]: *** Waiting for unfinished jobs....
can't handle line breaks in <dt>...</dt>
make[4]: Leaving directory '/home/travis/build/OSGeo/grass/man'
make[3]: *** [Makefile:57: manpages] Error 2

It's valid html right?

@dhdeangelis
Copy link
Contributor Author

This is what I added:

<p><em>wxIClass</em> can also import training areas defined in a vector layer. In that case the program expects the vector layer to have the following columns defined:
<ul>
    <li>cat: category value</li>
    <li>class: a string with the class name</li>
    <li>color: a color defined using a with format "RRR:GGG:BBB"</li>
</ul>
</p>

The html is correct IMO. What is it exactly that cannot be handled? Is line 64 too long?

OTOH I see there is a typo in my change, line 68, it should read a color defined using format "RRR:GGG:BBB

@echoix
Copy link
Member

echoix commented Sep 28, 2024

I'm sure it's that our code doesn't like </p>, but it is unexpected to me.

@dhdeangelis
Copy link
Contributor Author

How could I amend the PR to solve the typo I submitted in a 'gracious' git way?

@echoix
Copy link
Member

echoix commented Sep 28, 2024

Any way you'd like, we squash-merge and can edit the message before merging. Since there are no review comments yet, you can even force-push as much as you want without causing any problems.

@dhdeangelis
Copy link
Contributor Author

dhdeangelis commented Sep 28, 2024

OK. Let's see how it works. I did a "git amend" and a "git push -f". I corrected the typo and even deleted the potentially problematic </ ul > and < /p >

@echoix
Copy link
Member

echoix commented Sep 28, 2024

But we probably need the closing </ul> though

@dhdeangelis
Copy link
Contributor Author

I see. I'll fix it now.

@echoix echoix merged commit fee26ec into OSGeo:main Sep 28, 2024
23 checks passed
@echoix
Copy link
Member

echoix commented Sep 28, 2024

Thanks!

@echoix echoix added this to the 8.5.0 milestone Sep 28, 2024
@neteler
Copy link
Member

neteler commented Sep 28, 2024

@neteler The contents are correct, but how do we handle the particularities of the g.html2man.py that can't handle line breaks in <dt>...</dt> and g.gui.iclass.html:165:0: Error (IndexError('pop from empty list')): </p> in the Travis Build?

https://app.travis-ci.com/github/OSGeo/grass/jobs/626613157#L13795

make[4]: '/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/man/man1/g.gui.1' is up to date.
can't handle line breaks in <dt>...</dt>
VERSION_NUMBER=8.5.0dev /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/utils/g.html2man.py "/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/html/g.gui.iclass.html" "/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/man/man1/g.gui.iclass.1"
VERSION_NUMBER=8.5.0dev /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/utils/g.html2man.py "/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/html/g.gui.image2target.html" "/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/man/man1/g.gui.image2target.1"
/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/html/g.gui.iclass.html:165:0: Error (IndexError('pop from empty list')): </p>
make[4]: *** [../include/Make/Html.make:11: /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/man/man1/g.gui.iclass.1] Error 1
make[4]: *** Waiting for unfinished jobs....
can't handle line breaks in <dt>...</dt>
make[4]: Leaving directory '/home/travis/build/OSGeo/grass/man'
make[3]: *** [Makefile:57: manpages] Error 2

It's valid html right?

If it's valid (cannot check today) then we would need to update g.html2man.

@echoix
Copy link
Member

echoix commented Sep 28, 2024

Maybe related: #2668

@dhdeangelis dhdeangelis deleted the class-read-labels branch September 28, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs GUI wxGUI related HTML Related code is in HTML
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants